package algorithms.roughgarden.part2.dynamicprogramming.allpair;

class Edge {
	/**
	 * Tail Vertex
	 */
	private Vertex source;
	/**
	 * Head Vertex
	 */
	private Vertex destination;//OR HEAD
	
	private int weight;

	public Edge(Vertex source, Vertex destination, int weight){
		this.source = source;
		this.destination = destination;	
		
		this.weight = weight;
		
		this.source.addOutgoingEdge(this);
		this.destination.addIncomingEdge(this);
	}
	
	public int getEdgeWeight(){
		return weight;
	}
	public Vertex getSourceVertex(){
		return source;
	}

}
